import { isWeixin } from "@utils/index";
import $store from "../store";
export default {
    methods: {
        wxClickBakeMethods() {
            alert($store.state.app.lastPageUrl);
            wx.ready(function () {
                wx.closeWindow();
            });
            return false;
        }
    },
    mounted(){
        //处理微信返回问题
        
        if(isWeixin() && $store.state.app.lastPageUrl == 'Login'){
            window.addEventListener("popstate", this.wxClickBakeMethods, false);
        }
    },
    destroyed(){
        //处理微信返回问题
        window.removeEventListener("popstate", this.wxClickBakeMethods, false);
    },
}